Unmanaged languages, like C and C++, are inherently susceptible to memory-related errors that occur due to programming mistakes. Such errors cause numerous bugs that are difficult to detect, and they make applications vulnerable to malicious attacks that might, e.g., allow hostile parties to unlawfully take over the entire system. Memory errors therefore pose a serious problem during the development of an application and while it is in production.
There are various free and commercial tools that detect memory errors while applications are running. Example of such tools include: Insure++ of Parasoft™ Corporation in California, U.S.A., Purify of Rational from International Business Machines Corporation, Armonk, N.Y., and the open-source Valgrind project. Existing tools, for example, check that read operations are only performed on already-initialized memory and that write operations occur only within bounds. Some tools, however, introduce significant overhead and are therefore typically utilized only during development, not in production, potentially leaving yet-undetected errors.
Managed languages, like Java, C#, and Perl, employ a similar, built-in mechanism to check for memory errors; they therefore suffer from similar overheads. Both managed and unmanaged languages may enjoy a higher level of safety/correctness checks, such as the “taint mode” of Perl, which tracks all variable assignments to ensure that privileged applications are not unintentionally affected by inputs that may have been set by an unprivileged user. These checks likewise entail an overhead price.
The inventors of the present disclosure have recognized that one way to ameliorate the overhead is to have multiple tasks working in parallel checking for potential errors. The inventors of the present disclosure have also recognized that what is needed is a mechanism allowing fault detection to occur rapidly, in a fine-grained manner, with low overhead.